Skip to content

fix(mcpx): move the 11 guard-flagged constants into defaults.json (#8270) - #10071

Closed
dezren39 wants to merge 1 commit into
mainfrom
queue/16869-8270-defaults-guard
Closed

dezren39 wants to merge 1 commit into
mainfrom
queue/16869-8270-defaults-guard

Conversation

@dezren39

@dezren39 dezren39 commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Fixes #8270 — TestNoPackageRedeclaresADefault was red on clean main: 11 constants bypassed internal/defaults/defaults.json.

What moved where (task 15293's verified scope, all 11 sites)

  • mcpauth/failover (4): cooldown fallback 60s, minted-token refresh skew 5m, App JWT iat backdate 60s, App JWT lifetime 9m → new mcpauth section in defaults.json. Data, not settings: GitHub caps an App JWT at ten minutes, so these are protocol-bound — the same reasoning the defaults package already applies to the files/git sections.
  • cli import probes (2): the 10s context.WithTimeout in runCapture/runCaptureEnv → cli.importTimeout.
  • daemon script view (1): scriptWaitDelay 2s → daemon.scriptWaitDelay.
  • testsupport (3): sweep leftover grace 10s + poll 100ms, era test server reply wait 2s → new testsupport section.
  • seed sign mask (1): 1<<63 allowlisted in the guard with its written reason — it is the int64 sign mask (MaxInt63 by arithmetic), not a size or a policy value.

Verification

  • go test ./internal/defaults/ — green, guard included (was red with the 11 sites).
  • go build ./... — pass. internal/mcpauth, internal/testsupport/... — pass.
  • Full pkgs/mcpx suite: 61 packages ok. Every remaining failure was verified pre-existing on clean main in pristine worktrees (cli plugin-surface drift ×6, config merged-load ×1, refdoc parity ×1, e2e deps-source ×1, settings compendium ×1) or passes in isolation (two inline-daemon timing tests, load-sensitive during the parallel run). None is touched by this change.

Queue task 16869 (lane any-b). #8270 blocks task 15117 / issue #8900.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

)

TestNoPackageRedeclaresADefault was red on clean main: four mcpauth/failover timings, two cli import-probe timeouts, the daemon script-view wait, and three testsupport timings bypassed internal/defaults, plus the seed package sign mask.

New defaults sections mcpauth (cooldown, refreshSkew, jwtBackdate, jwtLifetime -- protocol-bound by GitHub's ten-minute App JWT cap, so data not settings) and testsupport (leftoverGracePeriod, leftoverPollInterval, eraReplyWait); cli.importTimeout and daemon.scriptWaitDelay join their existing sections. The seed 1<<63 is allowlisted in the guard with its reason: it is the int64 sign mask, arithmetic, not a size or a policy value.

Guard test green; mcpauth, testsupport and defaults suites pass. The six internal/cli surface failures (plugin declared twice, parity/manual drift) are pre-existing on clean main at 3b4cb17, verified in a pristine worktree, and untouched here.
@dezren39
dezren39 requested a review from a team as a code owner November 14, 2026 14:56
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T14:56:33.385425Z
We couldn’t complete this review. Comment @codex review to try again.
bb22e74 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 76a8b629-ab89-4bf8-901d-4780634c1331
Commits

Reviewing files that changed from the base of the PR and between 48c72ef and bb22e74.

Files selected for processing: 9

  • pkgs/mcpx/internal/cli/adapter_import.go
  • pkgs/mcpx/internal/cli/adapter_import_parse.go
  • pkgs/mcpx/internal/daemon/scriptview.go
  • pkgs/mcpx/internal/defaults/defaults.go
  • pkgs/mcpx/internal/defaults/defaults.json
  • pkgs/mcpx/internal/defaults/guard_test.go
  • pkgs/mcpx/internal/mcpauth/failover.go
  • pkgs/mcpx/internal/testsupport/eramcp/main.go
  • pkgs/mcpx/internal/testsupport/sweep.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

Closing as a superseded duplicate: PR #10065 (task 16870, issue #8720) merged the same 11-site fix for TestNoPackageRedeclaresADefault while this branch was in flight (the two packets carried different dedupe keys, #8270 vs #8720, for the same guard failure). Salvage diff posted on PR #10065: nothing unique in this branch needs to land — the guard is green on main (verified in a pristine worktree at bc42ebf). Issue #8270 closes on PR #10065's evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcpx: TestNoPackageRedeclaresADefault red on clean main — mcpauth/failover + testsupport constants bypass defaults.json

1 participant